//酷9专用JS,更多JS请加入酷9非官方群424765458

function main(yYDnQX1) {
    let url = yYDnQX1["url"];
    const id = ku9.getQuery( url,  "id" ) || "cdxwzh";
    const n = {
        'cdxwzh': 1,
        'cdjjzx': 2,
        'cddssh': 3,
        'cdyswy': 45,
        'cdgg': 5,
        'cdse': 6,
        'cdss': 9,
        'cdqc': 10,
        'cdzxxgx': 11,
        'cdmsly': 12,
        'cdrcxf': 15,
        'cdmrgw': 18
    };
    const m = {
        'jntv': 556,
        'slzh': 557,
        'wjtv': 559,
        'gxtv': 722,
        'xjtv': 760,
        'dyxwzh': 790,
        'pztv': 796,
        'pjtv': 828,
        'jjtv': 1541,
        'jttv': 840,
        'pdxwzh': 845,
        'lqzh': 882,
        'qytv': 910,
        'qbjtv': 966,
        'cztv': 1257,
        'djytv': 1314,
        'chyx': 1319,
        'qltv': 1427,
        'whtv': 1766,
        'xdzh': 1712,
        'jyxwzh': 1698
    };
    const headers = {};
    let finalUrl = "";
    if (n[id]) {
        const jsonUrl1 = "http://mob.api.cditv.cn/show/192-" + n[id] + ".html";
        let biurl1 = ku9.get(jsonUrl1, JSON.stringify(headers));
        if (biurl1 && ku9.isJsonObject(biurl1)) {
            finalUrl = JSON["parse"](biurl1)["data"]["ios_HDlive_url"] || JSON["parse"](biurl1)["data"]["ios_url"];
            finalUrl = finalUrl["replace"](/^http:/, "https:")
        }
    } else {
        if (m[id]) {
            const jsonUrl2 = "http://mob.api.cditv.cn/show/192-" + m[id] + ".html";
            let biurl2 = ku9.get(jsonUrl2, JSON.stringify(headers));
            if (biurl2 && ku9.isJsonObject(biurl2)) {
                finalUrl = JSON["parse"](biurl2)["data"]["ios_url"] || JSON["parse"](biurl2)["data"]["ios_url"]
            }
        }
    };
    return JSON["stringify"]({
        url: finalUrl
    })
}